﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace GlobalObjects
{
    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class Device
    {
        [DataMember, Newtonsoft.Json.JsonProperty,]
        public int User_id { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Location { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Privacy { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String APIKey { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Description { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Ip { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Boolean Status { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public Boolean Confirmed { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public DateTime Creation_date { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public DateTime Confirmation_date { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Longlat { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Connection_string { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Db_name { get; set; }

    }

    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class DeviceDiscovery
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public List<DeviceDis> Public { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public List<DeviceDis> Private { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public List<DeviceDis> Shared { get; set; }
    }

    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class DeviceDis
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Name { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Location { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Description { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Ip { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Longlat { get; set; }
    }
    [DataContract, Newtonsoft.Json.JsonObject(MemberSerialization = Newtonsoft.Json.MemberSerialization.OptIn)]
    public class CustomRepo
    {
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Id { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String Url { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public int Port { get; set; }
        [DataMember, Newtonsoft.Json.JsonProperty]
        public String DBName { get; set; }
      
    }
    [DataContract]
    public class TempData
    {
        [DataMember]
        public int Deviceid { get; set; }
        [DataMember]
        public int Sensoid { get; set; }
        [DataMember]
        public Temp Data { get; set; }
    }
    [DataContract]
    public class Temp
    {
        [DataMember]
        public string At { get; set; }
        [DataMember]
        public double Temperature { get; set; }
    }


}
